import { Request, Response, NextFunction } from 'express'

export default function errorHandler(err: any, req: Request, res: Response, next: NextFunction) {
  res.status(500).json({ message: err.message || '服务器错误' })
} 